package com.roncoo.education;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
//注册方法二：配合@WebServlet,@WebFilter,@WebListener使用
@ServletComponentScan
@SpringBootApplication
public class SpringBootDemo_2_5 {

	public static void main(String[] args) {
		SpringApplication.run(SpringBootDemo_2_5.class, args);
	}

	/* 注册方法一：
	@Bean
	public ServletRegistrationBean servletRegistrationBean() {
		return new ServletRegistrationBean(new CustomServlet(), "/hello");
	}

	@Bean
	public FilterRegistrationBean filterRegistrationBean() {
		return new FilterRegistrationBean(new CustomFilter(), servletRegistrationBean());
	}

	@Bean
	public ServletListenerRegistrationBean<CustomListener> servletListenerRegistrationBean() {
		return new ServletListenerRegistrationBean<CustomListener>(new CustomListener());
	}*/
}
